﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="admin.ascx.cs" Inherits="Jungle.Modules.Books.BooksAdmin" %>
<%@ Register Assembly="Omofor" Namespace="Jungle.Code.BookManager.WebControls" TagPrefix="OWC" %>


<asp:MultiView ID="GlobalMenu" runat="server">

<asp:View ID="v1" runat="server">
                <strong>
                    <br /><asp:LinkButton ID="lbtn_AddBook" runat="server" Text="Добавить книгу" PostBackUrl="~/Admin/Modules.aspx?mod=Books&cmd=add" CssClass="category_funcs_text" ></asp:LinkButton>
                    <br /><asp:LinkButton ID="lbtn_ViewBookList" runat="server" Text="Отобразить список активных книг" PostBackUrl="~/Admin/Modules.aspx?mod=Books&cmd=view" CssClass="category_funcs_text" ></asp:LinkButton>
                    <br /><asp:LinkButton ID="lbtn_ViewBookHiddenList" runat="server" Text="Отобразить список неактивных книг" PostBackUrl="~/Admin/Modules.aspx?mod=Books&cmd=viewHidden" CssClass="category_funcs_text" ></asp:LinkButton>
                </strong>
            </asp:View>
<asp:View ID="v2" runat="server">
                <table width="100%" height="100%" cellpadding = "0" cellspacing = "0">
                    <tr>
                        <td width="150px" height="25px"><strong>Название книги:</strong></td>
                        <td><asp:TextBox ID="txt_BookTitle" runat="server" /></td>
                    </tr>
                    <tr>
                        <td width="150px" height="25px"><strong>Автор:</strong></td>
                        <td><asp:TextBox ID="txt_Author" runat="server" /></td>
                    </tr>
                    <tr>
                        <td width="150px" height="25px"><strong>Издатель:</strong></td>
                        <td><asp:TextBox ID="txt_BookPublisher" runat="server" /></td>
                    </tr>
                    <tr>
                        <td width="150px" height="25px"><strong>Год издания:</strong></td>
                        <td><asp:TextBox ID="txt_BookPubYear" runat="server" /></td>
                    </tr>
                    <tr>
                        <td width="150px" height="25px"><strong>Количество страниц:</strong></td>
                        <td><asp:TextBox ID="txt_BookPagesCount" runat="server" /></td>
                    </tr>
                    <tr>
                        <td width="150px" height="25px"><strong>Формат:</strong></td>
                        <td><asp:TextBox ID="txt_Format" runat="server" /></td>
                    </tr>                    
                    <tr>
                        <td width="150px" height="25px"><strong>Качество:</strong></td>
                        <td>
                            <asp:DropDownList ID="ddl_BookQuality" runat="server">
                            <asp:ListItem>Плохое</asp:ListItem>
                            <asp:ListItem>Нормальное</asp:ListItem>
                            <asp:ListItem>Хорошее</asp:ListItem>
                            <asp:ListItem>Отличное</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td width="150px" height="25px"><strong>Серия:</strong></td>
                        <td><asp:TextBox ID="txt_BookSeries" runat="server" /></td>
                    </tr>
                    <tr>
                        <td width="150px" height="25px"><strong>Язык:</strong></td>
                        <td><asp:TextBox ID="txt_BookLanguage" runat="server" /></td>
                    </tr>
                    <tr>
                        <td width="150px" height="25px"><strong>Описание:</strong></td>
                        <td><asp:TextBox ID="txt_BookDescription" runat="server" Height="100px" /></td>
                    </tr>
                    <tr>
                        <td width="150px" height="25px"><strong>Цена:</strong></td>
                        <td><asp:TextBox ID="txt_BookPrice" runat="server" /></td>
                    </tr>                    
                    <tr>
                        <td>Фото:</td>
                        <td><asp:FileUpload ID="fu_Photo" runat="server" /></td>
                    </tr>
                    <tr>
                        <td><strong>Видна в каталоге:</strong></td>
                        <td>
                            <asp:DropDownList ID="ddl_Visible" runat="server">
                                <asp:ListItem>Да</asp:ListItem>
                                <asp:ListItem>Нет</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td width="150px" height="25px">
                            <asp:Button ID="btn_AddNewBook" runat="server" Text="Добавить книгу" Visible="false" OnClick="AddBook" />
                            <asp:Button ID="btn_SaveBookChanges" runat="server" Text="Сохранить" Visible="false" />
                        </td>
                        <td><strong><asp:Label ID="lbl_Result" runat="server" ></asp:Label></strong></td>
                    </tr>
                </table>
            </asp:View> 
<asp:View ID="v3" runat="server">
    <OWC:BookListAdminPart ID="BooksList" runat="server" />
</asp:View>

</asp:MultiView>